package de.baumann.browser.present

import de.baumann.browser.api.OdinObserver
import de.baumann.browser.api.net.vo.OdinWithdrawRecord
import de.baumann.browser.base.BasePresenter
import de.baumann.browser.iview.IWithdrawRecordView
import de.baumann.browser.model.CenterModel

class WithdrawRecordPresenter : BasePresenter<IWithdrawRecordView>() {

    private val centerModel = CenterModel()

    fun getWithdrawRecord() {
        this.centerModel.withdrawRecord
                .subscribe(object : OdinObserver<List<OdinWithdrawRecord>>(view) {
                    override fun onSuccess(data: List<OdinWithdrawRecord>?) {
                        if (view != null && data != null) {
                            view.setOdinWithdrawLise(data)
                        }
                    }
                })
    }
}
